<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>积分平台</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="__INDEX__/mui/css/mui.min.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/common.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/info.css"/>
		<link rel="stylesheet" type="text/css" href="__INDEX__/css/maowenke.css"/>
		<script src="__INDEX__/js/lib/font.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/vconsole.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
	   	
	    <div class="mui-content">
	    	<!--页面主结构开始-->
		    <div id="app" class="mui-views mui-fullscreen mui-control-content mui-active">
		        <div class="mui-view">
		            <div class="mui-navbar">
		            </div>
		            <div class="mui-pages">
		            </div>
		        </div>
		    </div>
		    <!--页面主结构结束-->
		    <!--单页面开始-->
		    <div id="setting" class="mui-page">
		        <!--页面标题栏开始-->
		        <!--<header class="mui-bar mui-bar-nav">
			   	    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			   	    <h1 class="mui-title">个人信息</h1>
			   	</header>-->
		        <div class="mui-navbar-inner mui-bar mui-bar-nav">
		            <button type="button" class="mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
		                <span class="mui-icon mui-icon-left-nav"></span>
		            </button>
		            <h1 class="mui-center mui-title">个人信息</h1>
		        </div>
		        <!--页面标题栏结束-->
		        <!--页面主内容区开始-->
		        <div class="mui-page-content">
		            <div class="mui-scroll-wrapper">
		                <div class="mui-scroll">
                        	<div class="modular">
					        	<div class="touxiang">
					        		<a href="#touxiang">
						        		<span class="mui-pull-left">头像</span>
						        		<div class="head-portrait mui-pull-right" data-color="#F8E71D" style="border-radius:50%;width: 55px;height: 55px;overflow: hidden;position: relative;">
											{if $user['portrait']}
											<img src="{:getImg($user['portrait'])}" width="100%" style="position: absolute;left: 0;top: 0;"/>
											{else}
											<img src="__INDEX__/images/touxiang.jpg" width="100%" style="position: absolute;left: 0;top: 0;"/>
											{/if}
							        	</div>
							        	<i class="mui-pull-right mui-icon mui-icon-arrowright"></i>
							        </a>
						        </div>
					        </div>
					        <div class="modular">
					        	<div class="nickname">
					        		<a href="javascript:;">
						        		<span class="mui-pull-left">昵称</span>
						        		<span class="mui-pull-right">{$user['nickname']}</span>
							        </a>
						        </div>
					        </div>
					        <div class="modular">
					        	<div class="nickname">
					        		<a href="javascript:;">
						        		<span class="mui-pull-left">性别</span>
						        		<span class="mui-pull-right">{$user['sex']}</span>
							        </a>
						        </div>
					        </div>
					        <div class="modular">
					        	<div class="nickname">
					        		<a href="javascript:;">
						        		<span class="mui-pull-left">所属部门</span>
						        		<span class="mui-pull-right">{$user['company_name']}/{$user['departmen_name']}</span>
							        </a>
						        </div>
					        </div>
					        <div class="modular">
					        	<div class="nickname">
					        		<a href="javascript:;">
						        		<span class="mui-pull-left">职位</span>
						        		<span class="mui-pull-right">{$user['position_name']}</span>
							        </a>
						        </div>
					        </div>
		                </div>
		            </div>
		        </div>
		        <!--页面主内容区结束-->
		    </div>
		    <!--单页面结束-->
		    <div id="touxiang" class="mui-page">
		        <div class="mui-navbar-inner mui-bar mui-bar-nav">
		            <button type="button" class=" mui-navbar-left mui-left mui-action-back mui-btn  mui-btn-link mui-btn-nav mui-pull-left">
		                <span class="mui-icon mui-icon-left-nav"></span>个人信息
		            </button>
		            <h1 class="mui-center mui-title">修改头像</h1>
					<span style="color: #ffffff;position: absolute;right:.1rem;top:.1rem" id="queding">确定</span>
		        </div>
		        <div class="mui-page-content">
		            <div class="mui-scroll-wrapper">
		                <div class="mui-scroll">
		                    <!--<ul class="mui-table-view">-->
		                        <!--<li class="mui-table-view-cell active">-->
		                            <!--<div class="back-color" data-color="#FFF75E">-->
		                            	<!--<p class="back-color-name">月亮黄</p>-->
		                            	<!--<p class="back-color-info">(智慧)</p>-->
		                            <!--</div>-->
		                            <!--<i class="mui-pull-left xuanzhong iconfont ">&#xe83b;</i>-->
		                        <!--</li>-->
		                    <!--</ul>-->
							<!--<div class="file">-->
								<input type="file" id="file" name="portrait">点击预览
							<!--</div>-->
							<div id="shows" style="border-radius:50%;width: 55px;height: 55px;overflow: hidden;position: relative;"></div>
		                </div>
		            </div>
		        </div>
		    </div>
	    </div>
		<script src="__INDEX__/js/lib/zepto.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/mui/js/mui.view.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/layer_mobile/layer.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/common.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/info.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/jquery.3.3.1.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="__INDEX__/js/maowenke.js" type="text/javascript" charset="utf-8"></script>
	<script>
		//var news = new VConsole();
//		console.log("haha1");
//		$("#file").on('change',function () {
//		    console.log('haha');
//			showImages($("#file"),$("#shows"),"100%",'',"position: absolute;left: 0;top: 0;");
//        });
		document.getElementById('file').addEventListener('change',function () {
			//console.log('haha');
            showImages($("#file"),$("#shows"),"100%",'',"position: absolute;left: 0;top: 0;");
        });
		$("#queding").on('tap',function () {
			ajax($("#file"),"{:url('update/userPortrait')}",function (data) {
				if(data.code==200){
				    mui.alert(data.msg);
				    setTimeout(function () {
						window.location.reload();
                    },1500);
				}else{
				    mui.alert(data.msg);
				}
            })
        })
	</script>
	</body>
</html>
